/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-api
 * Filename：	APatrolService.java
 * Created：		2016年8月28日
 * Creator：		wolv
 */
package com.thor.palmmall.rest.patrol;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.thor.commons.entity.BeanOperateInfo;
import com.thor.commons.exception.ThorServiceException;
import com.thor.commons.query.QueryResult;
import com.thor.palmmall.rest.common.AUserGroupLoadParam;

/**
 * @author wolv
 *
 */
@Path("/patrol")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface APatrolService {

  @GET
  @Path("/device/categorys")
  List<ADeviceCategory> queryCategorys(@QueryParam("isMaintenance") boolean isMaintenance,
      @QueryParam("isInspect") boolean isInspect) throws ThorServiceException;

  @GET
  @Path("/device/all")
  List<ADevice> queryDevices(@QueryParam("storeUuid") String storeUuid,
      @QueryParam("categoryUuid") String categoryUuid) throws ThorServiceException;

  @GET
  @Path("/device/{uuid}")
  ADevice getDevice(@PathParam("uuid") String uuid) throws ThorServiceException;

  @GET
  @Path("/patrolitem")
  List<APatrolItem> queryPatrolItems(@QueryParam("category") String category,
      @QueryParam("isMaintenance") boolean isMaintenance)
      throws ThorServiceException;

  @POST
  String create(APatrolBill bill, @QueryParam("") BeanOperateInfo operateInfo)
      throws ThorServiceException;

  @POST
  @Path("/save")
  void save(APatrolBill bill, @QueryParam("") BeanOperateInfo operateInfo)
      throws ThorServiceException;

  @POST
  @Path("/query")
  QueryResult<APatrolBill> query(APatrolQueryParam queryParam) throws ThorServiceException;

  @POST
  @Path("/{id}")
  APatrolBill get(@PathParam("id") String id, AUserGroupLoadParam param)
      throws ThorServiceException;
}
